package it.pir.es08ChatRMIPullDecorator;

import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
import java.util.List;

abstract public class ChatDecorator extends UnicastRemoteObject implements Chat{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Chat decoratedChat;
	
	public ChatDecorator(Chat decoratedChat) throws RemoteException{
		this.decoratedChat=decoratedChat;
	}
	
	public void send(Message msg) throws RemoteException{
		decoratedChat.send(msg);
	}
	
	public List<Message> receive(int lastId) throws RemoteException{
		return decoratedChat.receive(lastId);
	}
	
	
	 
}
